<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GCC 3.1 Release Series &mdash; Changes, New Features, and Fixes</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<!-- GCC maintainers, please do not hesitate to update/contribute entries
     concerning those part of GCC you maintain!  2002-03-23, Gerald.
-->

<body>
<h1>GCC 3.1 Release Series<br />Changes, New Features, and Fixes</h1>


<!-- Changes for later point releases should be added at the top. -->

<h2>Additional changes in GCC 3.1.1</h2>

<ul>
<li>A bug related to how structures and unions are returned has been
    fixed for <code>powerpc-*-netbsd*</code>.</li>
<li>An important bug in the implementation of
    <code>-fprefetch-loop-arrays</code> has been fixed.  Previously the
    optimization prefetched random blocks of memory for most targets except for
    i386.</li>
<li>The Java compiler now compiles Java programs much faster and also works
    with parallel make.</li>
<li>Nested functions have been fixed for <code>mips*-*-netbsd*</code>.</li>
<li>Some missing floating point support routines have beed added for
    <code>mips*-*-netbsd*</code>.</li>
<li>This <a href="https://gcc.gnu.org/ml/gcc/2002-07/msg01208.html">message</a>
    gives additional information about the bugs fixed in this release.</li>
</ul>


<h2>Caveats</h2>

<ul>
  <li>The <code>-traditional</code> C compiler option has been
  deprecated and will be removed in GCC 3.3.  (It remains possible to
  preprocess non-C code with the traditional preprocessor.)</li>

  <li>The default debugging format for most ELF platforms (including
  GNU/Linux and FreeBSD; notable exception is Solaris) has changed
  from stabs to DWARF2.  This requires GDB 5.1.1 or later.</li>
</ul>


<h2>General Optimizer Improvements</h2>

<ul>
<li><p>Jan Hubicka, SuSE Labs, together with Richard Henderson, Red Hat, and
    Andreas Jaeger, SuSE Labs, has contributed <a
    href="../news/profiledriven.html">infrastructure for profile driven
    optimizations</a>.</p>

    <p>Options <code>-fprofile-arcs</code> and
    <code>-fbranch-probabilities</code> can now be used to improve speed of
    the generated code by profiling the actual program behaviour on typical
    runs.  In the absence of profile info the compiler attempts to guess the
    profile statically.</p>
</li>

<li><p><a href="../benchmarks/">SPEC2000 and SPEC95</a> benchmark
    suites are now used daily to monitor performance of the generated
    code.</p>

    <p>According to the SPECInt2000 results on an AMD Athlon CPU, the code
    generated by GCC 3.1 is 6% faster on the average (8.2% faster with
    profile feedback) compared to GCC 3.0.  The code produced by GCC 3.0 is
    about 2.1% faster compared to 2.95.3.  Tests were done using the
    <code>-O2 -march=athlon</code> command-line options.</p>
</li>

<li>Alexandre Oliva, of Red Hat, has generalized the tree inlining
    infrastructure developed by CodeSourcery, LLC for
    the C++ front end, so that it is now used in the C front end
    too.  Inlining functions as trees exposes them earlier to the
    compiler, giving it more opportunities for optimization.
</li>

<li>Support for data prefetching instructions has been added to the GCC
    back end and several targets.  A new <code>__builtin_prefetch</code>
    intrinsic is available to explicitly insert prefetch instructions and
    experimental support for loop array prefetching has been added (see
    <code>-fprefetch-loop-array</code> documentation).
</li>

<li>Support for emitting debugging information for macros has been
    added for DWARF2. It is activated using <code>-g3</code>. 
</li>
</ul>

  
<h2>New Languages and Language specific improvements</h2>

<h3>C/C++</h3>

<ul>
<li>A few more <a href="../c99status.html">ISO C99 features</a>.</li>
<li>The preprocessor is 10-50% faster than the preprocessor in GCC
    3.0.</li>
<li>The preprocessor's symbol table has been merged with the
    symbol table of the C, C++ and Objective-C front ends.</li>
<li>The preprocessor consumes less memory than the preprocessor in
    GCC 3.0, often significantly so.  On normal input files, it
    typically consumes less memory than pre-3.0 cccp-based GCC,
    too.</li>
</ul>

<h3>C++</h3>

<ul>
<li><code>-fhonor-std</code> and <code>-fno-honor-std</code> have been
    removed. <code>-fno-honor-std</code> was a workaround to allow std
    compliant code to work with the non-std compliant libstdc++-v2.
    libstdc++-v3 is std compliant.</li>
<li>The C++ ABI has been fixed so that <code>void (A::*)() const</code> is
    mangled as "M1AKFvvE", rather than "MK1AFvvE" as before.  This change
    only affects pointer to cv-qualified member function types.</li>
<li><p>The C++ ABI has been changed to correctly handle this code:</p>
    <pre>
    struct A {
      void operator delete[] (void *, size_t);
    };

    struct B : public A { 
    };

    new B[10];
    </pre>
    <p>The amount of storage allocated for the array will be greater than
    it was in 3.0, in order to store the number of elements in the
    array, so that the correct size can be passed to
    <code>operator delete[]</code> when the array is deleted.  Previously,
    the value passed to <code>operator delete[]</code> was unpredictable.</p>
    <p>This change will only affect code that declares a two-argument
    <code>operator delete[]</code> with a second parameter of type
    <code>size_t</code> in a base class, and does not override that
    definition in a derived class.</p>
    </li>
<li><p>The C++ ABI has been changed so that:</p>
    <pre>
    struct A { 
      void operator delete[] (void *, size_t);
      void operator delete[] (void *);
    };
    </pre>
    <p>does not cause unnecessary storage to be allocated when an array of
    <code>A</code> objects is allocated.</p>
    <p>This change will only affect code that declares both of these
    forms of <code>operator delete[]</code>, and declared the two-argument
    form before the one-argument form.</p>
    </li>
<li>The C++ ABI has been changed so that when a parameter is passed by value,
    any cleanup for that parameter is performed in the caller, as specified
    by the ia64 C++ ABI, rather than the called function as before.  As a
    result, classes with a non-trivial destructor but a trivial copy
    constructor will be passed and returned by invisible reference, rather
    than by bitwise copy as before.</li>
<li><p>G++ now supports the "named return value optimization":  for code
    like</p>
    <pre>
    A f () {
      A a;
      ...
      return a;
    }
    </pre>
    <p>G++ will allocate <code>a</code> in the return value slot, so that the
    return becomes a no-op.  For this to work, all return statements in the
    function must return the same variable.</p>
    </li>
<li><p>Improvements to the C++ library are listed in
    <a href="https://gcc.gnu.org/onlinedocs/libstdc++/faq.html">the
    libstdc++-v3 FAQ</a>.</p>
    </li>
</ul>

<h3>Objective-C</h3>

<ul>
<li>Annoying linker warnings (due to incorrect code being generated)
    have been fixed.</li>
<li>If a class method cannot be found, the compiler no longer issues a
    warning if a corresponding instance method exists in the root
    class.</li>
<li>Forward @protocol declarations have been fixed.</li>
<li>Loading of categories has been fixed in certain situations (GNU
    run time only).</li>
<li>The class lookup in the run-time library has been rewritten so that
    class method dispatch is more than twice as fast as it used to be (GNU
    run time only).</li>
</ul>

<h3>Java</h3>

<ul>
<li>libgcj now includes RMI, <code>java.lang.ref.*</code>,
    <code>javax.naming</code>, and <code>javax.transaction</code>.</li>
<li>Property files and other system resources can be compiled into
    executables which use libgcj using the new <code>gcj --resource</code>
    feature.</li>
<li>libgcj has been ported to more platforms.  In particular there
    is now a mostly-functional mingw32 (Windows) target port.</li>
<li>JNI and CNI invocation interfaces were implemented, so gcj-compiled
    Java code can now be called from a C/C++ application.</li>
<li>gcj can now use builtin functions for certain known methods,
    for instance <code>Math.cos</code>.</li>
<li>gcj can now automatically remove redundant array-store checks in some 
    common cases.</li>
<li>The <code>--no-store-checks</code> optimization option was added.
    This can be used to omit runtime store checks for code which is known
    not to throw <code>ArrayStoreException</code></li>
<li>The following third party interface standards were added to
    libgcj: <code>org.w3c.dom</code> and <code>org.xml.sax</code>.</li>
<li><code>java.security</code> has been merged with GNU
    Classpath. The new package is now JDK 1.2 compliant, and much
    more complete.</li>
<li>A bytecode verifier was added to the libgcj interpreter.</li>
<li><code>java.lang.Character</code> was rewritten to comply with
    the Unicode 3.0 standard, and improve performance.</li>
<li>Partial support for many more locales was added to libgcj.</li>
<li>Socket timeouts have been implemented.</li>
<li>libgcj has been merged into a single shared library. There are no longer
    separate shared libraries for the garbage collector and zlib.</li>
<li>Several performance improvements were made to gcj and libgcj:
  <ul>
    <li>Hash synchronization (thin locks)</li>
    <li>A special allocation path for finalizer-free objects</li>
    <li>Thread-local allocation</li>
    <li>Parallel GC, and other GC tweaks</li>
  </ul>
</li>
</ul>

<h3>Fortran</h3>

<p>Fortran improvements are listed in              
<a href="https://gcc.gnu.org/onlinedocs/gcc-3.1.1/g77/News.html">the Fortran
documentation</a>.</p>

<h3>Ada</h3>
<p>
<a href="https://www.adacore.com">AdaCore</a>,
has contributed 
its GNAT Ada 95 front end and associated tools. The GNAT compiler fully 
implements the Ada language as defined by the ISO/IEC 8652 standard.
</p>
<p>
Please note that the integration of the Ada front end is still work in
progress.
</p>

<h2>New Targets and Target Specific Improvements</h2>

<ul>
<li>Hans-Peter Nilsson has contributed a port to MMIX,
    the CPU architecture used in new editions of Donald E. Knuth's <em>The
    Art of Computer Programming</em>.</li>
    
<li>Axis Communications has
    contributed its port to the CRIS CPU architecture, used in the ETRAX
    system-on-a-chip series.</li>

<li>Alexandre Oliva, of Red Hat, has contributed a port to the SuperH
    SH5 64-bit RISC microprocessor architecture, extending the existing
    SH port.</li>
    
<li>UltraSPARC is fully supported in 64-bit mode.  The option 
    <code>-m64</code> enables it.</li>

<li>For compatibility with the Sun compiler <code>#pragma
    redefine_extname</code> has been implemented on Solaris.</li>
    
<li>The x86 back end has had some noticeable work done to it.
    <ul>
      <li>SuSE Labs developers Jan
      Hubicka, Bo Thorsen and Andreas Jaeger have contributed a port to
      the AMD x86-64 architecture.  For more information on x86-64 see
      http://www.x86-64.org.</li>
      
      <li>The compiler now supports MMX, 3DNow!, SSE, and SSE2 instructions.
      Options <code>-mmmx</code>, <code>-m3dnow</code>, <code>-msse</code>,
      and <code>-msse2</code> will enable the respective instruction sets.
      Intel C++ compatible MMX/3DNow!/SSE intrinsics are implemented.  SSE2
      intrinsics will be added in next major release.</li>

      <li>Following those improvements, targets for Pentium MMX, K6-2, K6-3,
      Pentium III, Pentium 4, and Athlon 4 Mobile/XP/MP were added.
      Refer to the documentation on <code>-march=</code> and
      <code>-mcpu=</code> options for details.</li>

      <li>For those targets that support it, <code>-mfpmath=sse</code>
      will cause the compiler to generate SSE/SSE2 instructions for
      floating point math instead of x87 instructions.  Usually, this
      will lead to quicker code &mdash; especially on the Pentium
      4. Note that only scalar floating point instructions are used
      and GCC does not exploit SIMD features yet.</li>

      <li>Prefetch support has been added to the Pentium III, Pentium 4,
      K6-2, K6-3, and Athlon series.</li>

      <li>Code generated for floating point to integer conversions has been
      improved leading to better performance of many 3D applications.</li>
   </ul></li>

<li>The PowerPC back end has added 64-bit PowerPC GNU/Linux support.</li>

<li>C++ support for AIX has been improved.</li>

<li>Aldy Hernandez, of Red Hat, Inc,
has contributed extensions to the PowerPC port supporting the AltiVec
programming model (SIMD).  The support, though presently useful, is
experimental and is expected to stabilize for 3.2.  The support is
written to conform to Motorola's AltiVec specs.  See <code>-maltivec</code>.</li>

</ul>


<h2 id="obsolete_systems">Obsolete Systems</h2>

<p>Support for a number of older systems has been declared obsolete in
GCC 3.1.  Unless there is activity to revive them, the next release of
GCC will have their sources permanently <strong>removed</strong>.</p>

<p>All configurations of the following processor architectures have
been declared obsolete:</p>

<ul>
   <li>MIL-STD-1750A, <code>1750a-*-*</code></li>
   <li>AMD A29k, <code>a29k-*-*</code></li>
   <li>Convex, <code>c*-convex-*</code></li>
   <li>Clipper, <code>clipper-*-*</code></li>
   <li>Elxsi, <code>elxsi-*-*</code></li>
   <li>Intel i860, <code>i860-*-*</code></li>
   <li>Sun picoJava, <code>pj-*-*</code> and <code>pjl-*-*</code></li>
   <li>Western Electric 32000, <code>we32k-*-*</code></li>
</ul>

<p>Most configurations of the following processor architectures have
been declared obsolete, but we are preserving a few systems which may
have active developers.  It is unlikely that the remaining systems
will survive much longer unless we see definite signs of port
activity.</p>

<ul>
  <li>Motorola 88000 except
      <ul>
        <li>Generic a.out, <code>m88k-*-aout*</code></li>
        <li>Generic SVR4, <code>m88k-*-sysv4</code></li>
        <li>OpenBSD, <code>m88k-*-openbsd*</code></li>
      </ul>
  </li>
  <li>NS32k except
      <ul>
        <li>NetBSD, <code>ns32k-*-netbsd*</code></li>
	<li>OpenBSD, <code>ns32k-*-openbsd*</code>.</li>
      </ul>
  </li>
  <li>ROMP except
      <ul><li>OpenBSD, <code>romp-*-openbsd*</code>.</li></ul>
  </li>
</ul>

<p>Finally, only some configurations of these processor architectures
are being obsoleted.</p>

<ul>
  <li>Alpha:
      <ul>
        <li>OSF/1, <code>alpha*-*-osf[123]*</code>.
	  (Digital Unix and Tru64 Unix, aka <code>alpha*-*-osf[45]</code>,
	  are still supported.)</li>
      </ul>
  </li>
  <li>ARM:
      <ul>
        <li>RISCiX, <code>arm-*-riscix*</code>.</li>
      </ul>
  </li>
  <li>i386:
      <ul>
	<li>386BSD, <code>i?86-*-bsd*</code></li>
	<li>Chorus, <code>i?86-*-chorusos*</code></li>
	<li>DG/UX, <code>i?86-*-dgux*</code></li>
	<li>FreeBSD 1.x, <code>i?86-*-freebsd1.*</code></li>
	<li>IBM AIX, <code>i?86-*-aix*</code></li>
	<li>ISC UNIX, <code>i?86-*-isc*</code></li>
	<li>GNU/Linux with pre-BFD linker, <code>i?86-*-linux*oldld*</code></li>
	<li>NEXTstep, <code>i?86-next-*</code></li>
	<li>OSF UNIX, <code>i?86-*-osf1*</code> and 
		      <code>i?86-*-osfrose*</code></li>
	<li>RTEMS/coff, <code>i?86-*-rtemscoff*</code></li>
	<li>RTEMS/go32, <code>i?86-go32-rtems*</code></li>
	<li>Sequent/BSD, <code>i?86-sequent-bsd*</code></li>
	<li>Sequent/ptx before version 3, 
		<code>i?86-sequent-ptx[12]*</code> and 
		<code>i?86-sequent-sysv3*</code></li>
	<li>SunOS, <code>i?86-*-sunos*</code></li>
     </ul>
  </li>
  <li>Motorola 68000:
      <ul>
	<li>Altos, <code>m68[k0]*-altos-*</code></li>
	<li>Apollo, <code>m68[k0]*-apollo-*</code></li>
	<li>Apple A/UX, <code>m68[k0]*-apple-*</code></li>
	<li>Bull, <code>m68[k0]*-bull-*</code></li>
	<li>Convergent, <code>m68[k0]*-convergent-*</code></li>
	<li>Generic SVR3, <code>m68[k0]*-*-sysv3*</code></li>
	<li>ISI, <code>m68[k0]*-isi-*</code></li>
	<li>LynxOS, <code>m68[k0]*-*-lynxos*</code></li>
	<li>NEXT, <code>m68[k0]*-next-*</code></li>
	<li>RTEMS/coff, <code>m68[k0]*-*-rtemscoff*</code></li>
	<li>Sony, <code>m68[k0]*-sony-*</code></li>
      </ul>
  </li>
  <li>MIPS:
      <ul>
	<li>DEC Ultrix, <code>mips-*-ultrix*</code> and
			<code>mips-dec-*</code></li>
	<li>Generic BSD, <code>mips-*-bsd*</code></li>
	<li>Generic System V, <code>mips-*-sysv*</code></li>
	<li>IRIX before version 5, <code>mips-sgi-irix[1234]*</code></li>
	<li>RiscOS, <code>mips-*-riscos*</code></li>
	<li>Sony, <code>mips-sony-*</code></li>
	<li>Tandem, <code>mips-tandem-*</code></li>
      </ul>
   </li>
   <li>SPARC:
      <ul>
        <li>RTEMS/a.out, <code>sparc-*-rtemsaout*</code>.</li>
      </ul>
   </li>
</ul>


<h2>Documentation improvements</h2>

<ul>
<li>The old manual (&quot;Using and Porting the GNU Compiler
    Collection&quot;) has been replaced by a users manual (&quot;Using the
    GNU Compiler Collection&quot;) and a separate internals reference
    manual (&quot;GNU Compiler Collection Internals&quot;).</li>
<li>More complete and much improved documentation about GCC's
    internal representation used by the C and C++ front ends.</li>
<li>Many cleanups and improvements in general.</li>
</ul>

</body>
</html>
